class CreateCategories < ActiveRecord::Migration[5.0]
  def change
    create_table :categories do |t|
      t.string  :slug
      t.index   :slug

      t.string  :title
      t.string  :description

      t.boolean :editable
      t.boolean :sortable

      t.integer :parent_id
      t.index   :parent_id

      t.integer :position, default: 0
      t.index   :position

      t.text    :metadata
      t.text    :page_metadata_struct

      t.timestamps
    end
  end
end
